package db9;

import java.util.Scanner;

public class BytePanduan {
//    Scanner input =new Scanner(System.in);

    public static void main(String[] args) {
        Scanner input =new Scanner(System.in);
        System.out.println("请输入byte类型的数");
        try{
            int i = input.nextInt();
            if (i<-128){
                throw new ByteSizeException("输入数字不是byte类型");
            }
            if (i>128){
                throw new ByteSizeException("输入数字不是byte类型");
            }
        }catch (ByteSizeException e){
            e.printStackTrace();
        }



    }
}
